<template>
   <el-table
                tooltip-effect="dark"
                :header-cell-style="{
                    color: '#131416', fontsize: '0.875rem',
                    fontWeight: 'Bold', fontFamily:'Microsoft YaHei',
                    backgroundColor:'#F8F8F8',height:'2.5rem' }"
                :row-style="{height:'3.375rem'}"
                :cell-style="{}"
                :data="allTableData"
                style="margin:1.25rem 0 3.125rem 2rem;border-top: 1px solid #e6e6e6; border-radius: 2px;width:94.5rem;"
                >
                <el-table-column
                    prop="operator"
                    label="操作人"
                    width="200"
                    >
                    <template slot-scope="scope">
                        <span>{{scope.row.operator}}</span>
                    </template>
                </el-table-column>
                <el-table-column
                    prop="operator_time"
                    label="最近提取时间">
                    <template slot-scope="scope">
                       <span>{{scope.row.operator_time | dataFormat('YYYY-MM-DD HH:mm:ss')}}</span>
                    </template>
                </el-table-column>
                <el-table-column
                    prop="tag"
                    label="场景提取标签"
                    show-overflow-tooltip>
                    <template slot-scope="scope">
                        <span>{{scope.row.tag}}</span>
                    </template>
                </el-table-column>
                <el-table-column
                    prop="status"
                    label="提取状态"
                    show-overflow-tooltip>
                   <template slot-scope="scope">
                        <span v-if="scope.row.status === 0" >{{'待进行场景提取'}}</span>
                        <span v-if="scope.row.status === 1" >{{'场景提取中'}}</span>
                        <span v-if="scope.row.status === 2" >{{'场景提取完成'}}</span>
                    </template>
                </el-table-column>
                <el-table-column
                    prop="bag_name"
                    label="提取的场景数据包"
                    show-overflow-tooltip>
                    <template slot-scope="scope">
                        <span>{{scope.row.bag_name}}</span>
                    </template>
                </el-table-column>
            </el-table>
</template>

<script>
  export default{
    props: ['id'],
    data(){
      return{
        // 表格数据
        allTableData:[],
      }
    },
    created() {
        this.getTableData(this.id)
    },
    methods:{
       // 获取表格数据
        getTableData(pk) {
            this.$url.get('data/anonymized/scenecutsource/'+pk)
            .then(res => {
               if (res.status === 200) {
                    this.allTableData = res.data.data;
                }
            })
            .catch(err=>{
                
            })
        },
        
    }

  }

</script>
<style>

</style>